from django.db import models


# Create your models here.
class Video(models.Model):
    """视频"""
    title = models.CharField(verbose_name="视频标题", default="演示视频", max_length=256)
    video_file = models.FileField(verbose_name="视频路径", upload_to='video/')
    add_time = models.DateTimeField(verbose_name="上传时间", auto_now_add=True)

    def __str__(self):
        return self.title

    class Meta:
        db_table = "tb_video"
        verbose_name = "视频"
        verbose_name_plural = verbose_name
